home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / FinderDungeon.sit / Finder Dungeon / source code / FinderRegistry.h < prev    next >
Text File  |  1997-06-28  |  9KB  |  362 lines

  1. /*
  2.     File:        FinderRegistry.h
  3.  
  4.     Contains:    Classes, properties and data types used by the Scriptable Finder
  5.  
  6.     Written by:    Francis Stanbach & Greg Anderson
  7.  
  8.     Copyright:    © 1991-4 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.  
  13.     To Do:
  14. */
  15.  
  16. #ifndef __FINDERREGISTRY__
  17. #define __FINDERREGISTRY__
  18. #define FinderRegistry_h
  19.  
  20. #ifndef __AEREGISTRY__
  21. #include "AERegistry.h"
  22. #endif
  23.  
  24. ////////////////////////////////////////
  25. // Finder Suite
  26. ////////////////////////////////////////
  27.  
  28. //
  29. // The old Finder Event suite was 'FNDR'
  30. // The new suite is 'fndr'
  31. //
  32. enum {
  33.     kAEFinderSuite                = 'fndr'
  34. };
  35.  
  36. ////////////////////////////////////////
  37. // Finder Events
  38. ////////////////////////////////////////
  39.  
  40. enum {
  41.     kAECleanUp                    = 'fclu',
  42.     kAEEject                    = 'ejct',
  43.     kAEEmpty                    = 'empt',
  44.     kAEErase                    = 'fera',
  45.     kAEGestalt                    = 'gstl',
  46.     kAEPutAway                    = 'ptwy',
  47.     kAERebuildDesktopDB            = 'rddb',
  48.     kAESnooze                    = 'snoz',                // Go to sleep
  49.     kAEUpdate                    = 'fupd'
  50. };
  51.  
  52. ////////////////////////////////////////
  53. // Classes
  54. ////////////////////////////////////////
  55.  
  56. enum {
  57.     cFinder                        = cApplication,        // the finder object ≈ null
  58.  
  59.     cDisk                        = 'cdis',
  60.     cFolder                        = 'cfol',
  61.     cTrash                        = 'ctrs',
  62.     cDesktop                    = 'cdsk',
  63.     cContainer                    = 'ctnr',                // Disks, folders, trashes, desktops, suitcases
  64.     cSharableContainer            = 'sctr',                // Disks and folders
  65.     cSuitcase                    = 'stcs',
  66.     cFontSuitcase                = 'fsut',
  67.     cAccessorySuitcase            = 'dsut',
  68.  
  69.     cAliasFile                    = 'alia',
  70.  
  71.     cApplicationFile            = 'appf',
  72.     cDocumentFile                = 'docf',
  73.     cControlPanel                = 'ccdv',
  74.     cDeskAccessoryFile            = 'dafi',
  75.     cSoundFile                    = 'sndf',
  76.     cFontFile                    = 'fntf',
  77.  
  78.     cContentSpace                = 'dwnd',                // Content space:  includes desktop window & other windows
  79.     cContainerWindow            = 'cwnd',
  80.     cInfoWindow                    = 'iwnd',
  81.     cSharingWindow                = 'swnd',
  82.     cStatusWindow                = 'qwnd',                // Empty trash progress, 'copy' window
  83.  
  84.     cPrivilege                    = 'priv',
  85.     cGestalt                    = 'cgst',
  86.     cProcess                    = 'prcs',                // Information about a process running on this machine (like cApplication)
  87.     cAccessoryProcess            = 'pcda',
  88.     cApplicationProcess            = 'pcap',
  89.  
  90.     cEntireContents                = 'ects',
  91.  
  92.     cUser                        = 'cuse',
  93.     cGroup                        = 'sgrp',
  94.  
  95.     cIconFamily                    = 'ifam'
  96. };
  97.  
  98. ////////////////////////////////////////
  99. // Properties
  100. ////////////////////////////////////////
  101.  
  102. //
  103. // Properties of cObject:
  104. //
  105. enum {
  106.     pComment                    = 'comt',
  107.     pContainer                    = cContainer,            // The container the object is stored in
  108.     pCreationDate                = 'crtd',
  109.     pDemiWindow                    = cContentSpace,
  110.     pDisk                        = cDisk,                // the disk the object is stored on
  111.     pIconBitmap                    = 'iimg',
  112.     pInformationWindow            = cInfoWindow,            // Get info window
  113.     pStatusWindow                = cStatusWindow,        // Status window (copy, empty trash, rebuild desktop database)
  114.     pIsLocked                    = 'islk',
  115.     pIsSelected                    = 'issl',
  116.     pKind                        = 'kind',
  117.     pModificationDate            = 'modd',
  118.     pPhysicalSize                = 'phys',
  119.     pPosition                    = 'posn',
  120.     pSize                        = pPointSize,            // both are called "Size" in their respective terminologies, so they must have the same four-character code
  121.     pWindow                        = cWindow
  122. };
  123.  
  124. //
  125. // Properties of cFile:
  126. //
  127. enum {
  128.     pCreatorType                = 'fcrt',
  129.     pFileType                    = 'fitp',
  130.     pVersion2                    = 'ver2'
  131. };
  132.  
  133. //
  134. // Properties of cAliasFile:
  135. //
  136. enum {
  137.     pOriginalItem                = 'orig'                // Item pointed to by alias
  138. };
  139.  
  140. //
  141. // Properties of cApplicationFile:
  142. //
  143. enum {
  144.     pAppPartition                = 'appt',
  145.     pSuggestedAppPartition        = 'sprt',
  146.     pMinAppPartition            = 'mprt'
  147. };
  148.  
  149. //
  150. // Properties of cContainer:
  151. //
  152. enum {
  153.     pContainerWindow            = cContainerWindow,    // Window that contains children
  154.     pEntireContents                = cEntireContents,
  155.     pLabelIndex                    = 'labi',
  156.     pExpanded                    = 'pexp',                // Same as kAEExpanded
  157.     pExpandable                    = 'pexa',
  158.     pCompletelyExpanded            = 'pexc',
  159.     pSharingWindow                = cSharingWindow,        // Sharing window
  160.     pView                        = 'pvew',
  161.     pPreviousView                = 'svew',                // The last listwindow (non-icon) view
  162.  
  163.     pSharing                    = 'shar',
  164.     pSharingProtection            = 'spro',
  165.     pExported                    = 'sexp',
  166.     pMounted                    = 'smou',
  167.     pInheritedPrivileges        = 'iprv',                // "Same as enclosing" checkbox
  168.     pOwner                        = 'sown',
  169.     pGroup                        = cGroup,
  170.     pOwnerPrivileges            = 'ownr',
  171.     pGroupPrivileges            = 'gppr',
  172.     pGuestPrivileges            = 'gstp'
  173. };
  174.  
  175. //
  176. // Properties of cDisk:
  177. //
  178. enum {
  179.     pCapacity                    = 'capa',
  180.     pEjectable                    = 'isej',
  181.     pFreeSpace                    = 'frsp',
  182.     pLocal                        = 'isrv',
  183.     pIsStartup                    = 'istd'
  184. };
  185.  
  186. //
  187. // Properties of cDesktop:
  188. //
  189. enum {
  190.     pTrash                        = 'trsh',                // Can't use cTrash, and pTrash must == kTrashFolderType
  191.     pStartupDisk                = 'sdsk'
  192. };
  193.  
  194. //
  195. // Properties of cTrash:
  196. //
  197. enum {
  198.     pWarnOnEmpty                = 'warn'
  199. };
  200.  
  201. //
  202. // Properties of cFinder / cApplication:
  203. //
  204. enum {
  205.     pAppleMenuItemsFolder        = 'amnu',                // kAppleMenuFolderType
  206.     pControlPanelsFolder        = 'ctrl',                // kControlPanelFolderType
  207.     pDesktop                    = 'desk',                // Can't use cDesktop, and pDesktop must == kDesktopFolderType
  208.     pExtensionsFolder            = 'extn',                // kExtensionFolderType
  209.     pFileShareOn                = 'fshr',
  210.     pFileShareStartingUp        = 'fsup',
  211.     pFontsFolder                = 'ffnt',
  212.  
  213.     pLargestFreeBlock            = 'mfre',
  214.     pPreferencesFolder            = 'pref',                // kPreferencesFolderType
  215.     pAboutMacintosh                = 'abbx',                // Open this to get 'About this Macintosh' window
  216.     pShortcuts                    = 'scut',                // Finder shortcuts in help menu
  217.     pShutdownFolder                = 'shdf',
  218.     pStartupItemsFolder            = 'strt',                // kStartupFolderType
  219.     pSystemFolder                = 'macs',                // kSystemFolderType
  220.     pTemporaryFolder            = 'temp',                // kTemporaryFolderType
  221.     pTimerItemsFolder            = 'timf',
  222.     pViewPreferences            = 'pvwp'                // Finder view preferences ("Views" control panel)
  223. };
  224.  
  225. //
  226. // View preferences properties
  227. //
  228. enum {
  229.     pViewFont                    = 'vfnt',
  230.     pViewFontSize                = 'vfsz',
  231.     pGridIcons                    = 'fgrd',
  232.     pListViewIconSize            = 'lvis',
  233.     pShowComment                = 'scom',
  234.     pShowDate                    = 'sdat',
  235.     pShowDiskInfo                = 'sdin',
  236.     pShowFolderSize                = 'sfsz',
  237.     pShowKind                    = 'sknd',
  238.     pShowLabel                    = 'slbl',
  239.     pShowSize                    = 'ssiz',
  240.     pShowVersion                = 'svrs',
  241.     pStaggerIcons                = 'fstg'
  242. };
  243.  
  244. //
  245. // Properties of cPrivilegs
  246. //
  247. enum {
  248.     pSeeFiles                    = 'prvr',
  249.     pSeeFolders                    = 'prvs',
  250.     pMakeChanges                = 'prvw'
  251. };
  252.  
  253. //
  254. // Properties of cProcess
  255. //
  256. enum {
  257.     pApplicationFile            = cApplicationFile,
  258.  
  259.     pDeskAccessoryFile            = cDeskAccessoryFile,
  260.     pIsScriptable                = 'isab',
  261.     pLocalAndRemoteEvents        = 'revt',
  262.     pPartitionSpaceUsed            = 'pusd',
  263.  
  264.     pFolder                        = cFolder,
  265.     pObject                        = cObject,
  266.     pSharableContainer            = cSharableContainer,
  267.     pSuitcase                    = cSuitcase,
  268.     pFontSuitcase                = cFontSuitcase,
  269.     pAccessorySuitcase            = cAccessorySuitcase
  270. };
  271.  
  272.  
  273. ////////////////////////////////////////
  274. // Enumerations defined by the Finder
  275. ////////////////////////////////////////
  276.  
  277. enum {
  278.     enumViewBy                    = 'vwby',
  279.     pSmallIcon                    = 'smic',
  280.     enumGestalt                    = 'gsen',
  281.     enumConflicts                = 'cflc',
  282.     enumExistingItems            = 'exsi'
  283. };
  284.  
  285. ////////////////////////////////////////
  286. // Types defined by the Finder
  287. ////////////////////////////////////////
  288.  
  289. enum {
  290.     typeIconFamily                = cIconFamily,            // An AEList of typeIconAndMask, type8BitIcon, & c.
  291.     typeIconAndMask                = 'ICN#',
  292.     type8BitIcon                = 'icl8',
  293.     type4BitIcon                = 'icl4',
  294.     typeSmallIconAndMask        = 'ics#',
  295.     typeSmall8BitIcon            = 'ics8',
  296.     typeSmall4BitIcon            = 'ics4'
  297. };
  298.  
  299. ////////////////////////////////////////
  300. // Keywords defined by the Finder
  301. ////////////////////////////////////////
  302.  
  303. enum {
  304.     keyIconAndMask                = 'ICN#',
  305.     key8BitIcon                    = 'icl8',
  306.     key4BitIcon                    = 'icl4',
  307.     keySmallIconAndMask            = 'ics#',
  308.     keySmall8BitIcon            = 'ics8',
  309.     keySmall4BitIcon            = 'ics4',
  310.  
  311.     keyAEUsing                    = 'usin',
  312.     keyAEReplacing                = 'alrp',
  313.  
  314.     keyLocalPositionList        = 'mvpl',
  315.     keyGlobalPositionList        = 'mvpg'
  316. };
  317.  
  318. ////////////////////////////////////////
  319. // New prepositions used by the Finder
  320. ////////////////////////////////////////
  321.  
  322. enum {
  323.     keyASPrepositionHas            = 'has ',
  324.     keyAll                        = 'kyal',
  325.     keyOldFinderItems            = 'fsel'
  326. };
  327.  
  328. ////////////////////////////////////////
  329. // New key forms used by the Finder
  330. ////////////////////////////////////////
  331.  
  332. enum {
  333.     formAlias                    = typeAlias,
  334.     formCreator                    = pCreatorType
  335. };
  336.  
  337. ////////////////////////////////////////
  338. // Finder error codes
  339. ////////////////////////////////////////
  340.  
  341. enum {
  342.     errFinderIsBusy                    = -15260,
  343.     errFinderWindowNotOpen            = -15261,
  344.     errFinderCannotPutAway            = -15262,
  345.     errFinderWindowMustBeIconView    = -15263,        // RequireWindowInIconView
  346.     errFinderWindowMustBeListView    = -15264,        // RequireWindowInListView
  347.     errFinderCantMoveToDestination    = -15265,
  348.     errFinderCantMoveSource            = -15266,
  349.     errFinderCantOverwrite            = -15267,
  350.     errFinderIncestuousMove            = -15268,        
  351.     errFinderCantMoveToAncestor        = -15269,        
  352.     errFinderCantUseTrashedItems    = -15270,
  353.     errFinderItemAlreadyInDest        = -15271,        // Move from folder A to folder A
  354.     errFinderUnknownUser            = -15272,        // Includes unknown group
  355.     errFinderSharePointsCantInherit    = -15273,
  356.  
  357.     errFinderBoundsWrong            = -15278,
  358.     errAEValueOutOfRange            = -15279
  359. };
  360.  
  361. #endif
  362.